package com.scoring.system.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.scoring.system.mapper.ColleageMapper;
import com.scoring.system.pojo.Colleage;
import com.scoring.system.service.ColleageService;
@Service("colleageService")
public class ColleageServiceImpl implements ColleageService {
	
	@Resource
	private ColleageMapper colleageDao;

	@Override
	public int deleteColleage(int id) {
		return colleageDao.deleteByPrimaryKey(id);
	}

	@Override
	public int saveColleage(Colleage record) {
		return colleageDao.insert(record);
	}

	@Override
	public Colleage getColleageById(int id) {
		return colleageDao.selectByPrimaryKey(id);
	}

	@Override
	public Colleage getColleageByName(String name) {
		return colleageDao.selectByName(name);
	}

	@Override
	public List<Colleage> listColleage() {
		return colleageDao.listColleage();
	}

	@Override
	public int updateColleage(Colleage record) {
		return colleageDao.updateByPrimaryKey(record);
	}

}
